<?php
include 'bizClass.php';

$username = $_POST['username'];
$email1 = $_POST['email'];
$email2 = $_POST['confirmemail'];
$password = $_POST['pwd'];
$description = $_POST['comments'];

$mysql_host = "mysql16.000webhost.com";
$mysql_database = "a1863493_venture";
$mysql_user = "a1863493_teamven";
$mysql_password = "teamventure1";


if( $email1 != $email2 )
{
	header ('Location: ../index.html');
}
else // connected here V
{
	
	$link = mysql_connect($mysql_host, $mysql_user, $mysql_password); 
	
	if (!$link) 
	{
		die('Could not connect: ' . mysql_error());
	} 
	echo 'Connected successfully'; 
	mysql_select_db($mysql_database, $link) or die ("Fail");
	
	$biz = new bizClass($username);
	$biz->createBusiness($username, $password, $email1, $description);
		header ('Location: ../index.html');
}


?>